package com.caiheng.api.entity.event;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 计划任务：人员计划记录对象 event_plan_task
 *
 * @author ruoyi
 * @date 2023-12-25
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("event_plan_task")
public class EventPlanTask implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * $column.columnComment
     */
    private Integer propertyId;

    /**
     * $column.columnComment
     */
    private Integer estateId;

    /**
     *  地点二维码id
     */
    private Integer pointQrId;

    /**
     *  任务类型
     */
    private Integer eventType;

    /**
     *  任务类型名称
     */
    private String eventTypeName;


    /**
     * 计划id
     */
    private Integer eventPlanId;

    /**
     * 任务id
     */
    private Integer eventTargetId;

    /**
     *  event_work表的id
     */
    private Integer workId;

    /**
     * 执行人用户id
     */
    private Integer workerSysUserId;

    /**
     * 执行人姓名
     */
    private String workerName;

    /**
     * 执行人手机号
     */
    private String workerPhone;

    /**
     * 执行人 微信id
     */
    private Integer workerWxUserId;

    /**
     * 任务开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    /**
     * 任务结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 任务执行状态 0 - 未处理 1 - 进行中   2 - 已完成  3 - 已超期  4 - 已取消
     */
    private Integer state;

    /**
     * 添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     *  处理时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date handleTime;


    @TableField(exist = false)
    private List<EventPlanTaskImg> imgs;


    @TableField(exist = false)
    private String planTitle;

    @TableField(exist = false)
    private String estateName;


    @TableField(exist = false)
    private Integer checkFinishType;

    @TableField(exist = false)
    private Integer finishType;

    @TableField(exist = false)
    private Integer workState;


    @TableField(exist = false)
    private List<EventPlanTaskLeader> leaders;

    @TableField(exist = false)
    private String leaderNames;


    @TableField(exist = false)
    private String workerNames;


    /**
     *  work表的 处理时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date opTime;


    /**
     *  巡检类型的 设备组
     */
    @TableField(exist = false)
    private EventTerminalGroup terminalGroup;

    /**
     *  巡检类型的 设备组
     */
    @TableField(exist = false)
    private EventPatrolLine patrolLine;

    /**
     *  保洁
     */
    @TableField(exist = false)
    private EventCleanAreaList cleanAreaList;


    @TableField(exist = false)
    private Integer isMyTask;
}
